package com.dkd.manage.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.dkd.common.annotation.Excel;
import com.dkd.common.core.domain.BaseEntity;

/**
 * 库存管理对象 tb_stock
 * 
 * @author LQL
 * @date 2025-04-22
 */
public class Stock extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 库存ID */
    private Long stockId;

    /** 产品ID */
    @Excel(name = "产品ID")
    private Long fkProductId;

    /** 库存数量 */
    @Excel(name = "库存数量")
    private Long quantity;

    /** 锁定库存 */
    @Excel(name = "锁定库存")
    private Long lockedQuantity;

    /** 乐观锁版本号 */
    @Excel(name = "乐观锁版本号")
    private Long version;

    public void setStockId(Long stockId) 
    {
        this.stockId = stockId;
    }

    public Long getStockId() 
    {
        return stockId;
    }
    public void setFkProductId(Long fkProductId) 
    {
        this.fkProductId = fkProductId;
    }

    public Long getFkProductId() 
    {
        return fkProductId;
    }
    public void setQuantity(Long quantity) 
    {
        this.quantity = quantity;
    }

    public Long getQuantity() 
    {
        return quantity;
    }
    public void setLockedQuantity(Long lockedQuantity) 
    {
        this.lockedQuantity = lockedQuantity;
    }

    public Long getLockedQuantity() 
    {
        return lockedQuantity;
    }
    public void setVersion(Long version) 
    {
        this.version = version;
    }

    public Long getVersion() 
    {
        return version;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("stockId", getStockId())
            .append("fkProductId", getFkProductId())
            .append("quantity", getQuantity())
            .append("lockedQuantity", getLockedQuantity())
            .append("version", getVersion())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .append("remark", getRemark())
            .toString();
    }
}
